<?php
// resend password
//
// digiboard by digitalboom.org
// http://www.digitalboom.org
//
// Information Technology program
// Sirindhorn International Institute of Technology
// Thammasat University, Rangsit Campus
// http://www.siit.tu.ac.th
//
// authors: hoho , sea
// first created on: 2003 Jun 06
// last modified on: 2008 May 15
// last modified by: sea

include("settings/config.inc.php");
include("settings/accounts.inc.php");
include("lib/util.inc.php");
include("lib/users_function.inc.php");

global $db_link, $DGB;

extract($_POST);
extract($_GET);

$error_message = "";   

if (empty($Username)) {
 $error_message.="##  Please add your Username\\n";
}

if (!empty($error_message)) {
 $javatext = "<script language='JavaScript'>alert('Please complete your detail :\\n$error_message'); history.back();</Script>";
 echo $javatext;
 exit;
}

addslashes($Username);

$ValidUser = SendUserPass($Username);


if ($ValidUser == "1") {
 $javatext = "<script language='JavaScript'>alert('Reset password method have been send to your registered email.:\\n'); history.back();</Script>";
 echo $javatext;
 exit;
} else {
 $javatext = "<script language='JavaScript'>alert('Incorrect UserName:\\n'); history.back();</Script>";
 echo $javatext;
 exit;
}
?>
